using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using EditeurSyntaxiqueVocal.Forms;

namespace EditeurSyntaxiqueVocal.Languages.LanguageZ
{
    public sealed partial class OptionsIndentation : Form
    {
        private readonly MainForm mainForm;

        public OptionsIndentation(MainForm mainForm)
        {
            if (mainForm == null) Close();

            InitializeComponent();
            MaximumSize = MinimumSize = Size;

            this.mainForm = mainForm;
            CheckBoxCapitaleLetterOuiNon.Checked = mainForm.IndentatonMajuscule;
            NumericUpDownStep.Value = mainForm.IndentationPasAeration;
        }


        private void ButtonOk_Click(object sender, EventArgs e)
        {

            mainForm.IndentatonMajuscule = CheckBoxCapitaleLetterOuiNon.Checked;
            mainForm.IndentationPasAeration = (int)NumericUpDownStep.Value;
            Close();
        }

        private void ButtonCnacel_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}